import fetch from 'common/src/utils/fetch';
import baseUrl from './env';

// 查询本科生教学大纲统计提交率和审核通过率
function getRate(data) {
    return fetch({
        url: `${baseUrl}/syllabusEntryUnder/sum/getRate`,
        method: 'post',
        data
    });
}

function download(data) {
    return fetch({
        url: `${baseUrl}/syllabusEntryUnder/sum/SyllabusSum/exportList`,
        method: 'post',
        data
    });
}
function normalDownload(data) {
    return fetch({
        url: `${baseUrl}/file/batchExport`,
        method: 'post',
        data
    });
}
function exportList(data) {
    return fetch({
        url: `${baseUrl}/syllabusEntry/Syllabus/exportList`,
        method: 'post',
        data
    });
}
function exportStatus(key) {
    return fetch({
        url: `${baseUrl}/file/result/${key}`,
        method: 'get'
    });
}
// 教学大纲 审核页驳回
function approveRejected(data) {
    return fetch({
        url: `${baseUrl}/postApprove/approveRejected`,
        method: 'post',
        data
    });
}

// 管理审核教师-列表
function getPage(data) {
    return fetch({
        url: `${baseUrl}/auditTeacher/page`,
        method: 'post',
        data
    });
}

// 管理审核教师-新增
function batchAddTeacher(data) {
    return fetch({
        url: `${baseUrl}/auditTeacher/batchAddTeacher`,
        method: 'post',
        data
    });
}

// 管理审核教师-删除
function deleteTemplateList(data) {
    return fetch({
        url: `${baseUrl}/auditTeacher/deleteTemplateList`,
        method: 'post',
        data
    });
}

export default {
    'getRate': getRate,
    'download': download,
    'normalDownload': normalDownload,
    'exportStatus': exportStatus,
    "exportList": exportList,
    "approveRejected": approveRejected,
    "getPage": getPage,
    "batchAddTeacher": batchAddTeacher,
    "deleteTemplateList": deleteTemplateList
};

